Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow comments in .python-version[s] #5350

Merged
merged 3 commits into from
Jul 23, 2024
Merged

Allow comments in .python-version[s] #5350

merged 3 commits into from
Jul 23, 2024

Conversation

j178
Copy link
Contributor

@j178 j178 commented Jul 23, 2024

Summary

Do the same thing as astral-sh/rye#1038.

@charliermarsh
Copy link
Member

Check out python_pin.rs?

@j178 j178 marked this pull request as ready for review July 23, 2024 17:31
@j178
Copy link
Contributor Author

j178 commented Jul 23, 2024

Thanks, I added a test.

Comment on lines 638 to 639
let child = context.temp_dir.child("foo");
child.create_dir_all()?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason we need a child directory? The context.temp_dir should be fine, right? Then you don't need to set the working directory.

Copy link
Contributor Author

@j178 j178 Jul 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm testing both .python-version and .python-versions in the same test, so I want to separate them by using different subdirectory, otherwise only one of them will be utilized.

Copy link
Member

@zanieb zanieb Jul 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just test the one that has higher precedence first. edit: second* :)

I'd recommend separate tests though over creating subdirectories for mixed state in a single test.

@zanieb zanieb self-assigned this Jul 23, 2024
@zanieb zanieb merged commit 96b2434 into astral-sh:main Jul 23, 2024
54 of 55 checks passed
@zanieb zanieb added enhancement New feature or improvement to existing functionality preview Experimental behavior labels Jul 23, 2024
@j178 j178 deleted the empty-line branch July 23, 2024 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality preview Experimental behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants